package com.hnevc.musicplayer;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.SeekBar;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private SeekBar musicSeekBar;
    private TextView progress_tv;
    private TextView total_tv;
    private Button play_btn;
    private Button pause_btn;
    private Button continue_btn;
    private Button exit_btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        initDate();
        initEvent();
    }

    private void initView(){
        musicSeekBar = findViewById(R.id.music_seekbar);
        progress_tv = findViewById(R.id.progress_tv);
        total_tv = findViewById(R.id.total_tv);
        play_btn = findViewById(R.id.play_btn);
        pause_btn = findViewById(R.id.pause_btn);
        continue_btn = findViewById(R.id.continue_btn);
        exit_btn = findViewById(R.id.exit_btn);

    }
    private void initDate(){

    }
    private void initEvent(){
    musicSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
        //进度条发生改变时
        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {

        }
        //进度条滑动时
        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {

        }
        //进度条停止滑动
        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {

        }
    });
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.play_btn:
                break;
            case R.id.pause_btn:
                break;
            case R.id.continue_btn:
                break;
            case R.id.exit_btn:
                break;
        }
    }
}